import http from '@/utils/request'

// 获取抽奖状态
export function getMarketStatus() {
	return http.get('/shop/market/getMarketing')
}

// 修改抽奖状态
export function enableLottery(enable) {
	return http.get('/shop/market/enableLottery/' + enable)
}

// 修改秒杀状态
export function enableSeckill(enable) {
	return http.get('/shop/market/enableSeckill/' + enable)
}

// 获取所有商品
export function getPrizes(times) {
	return http.get('/shop/prize/list/' + times)
}

export function getCoupon() {
	return http.get('/shop/coupon/getAll')
}

// 修改商品
export function editPrizes(prize) {
	return http.post('/shop/prize/edit', prize)
}

// 删除奖品
export function delPrize(prizeId,times) {
	return http.delete('/shop/prize/del/'+ prizeId + "/" + times)
}

export function addCoupon(params) {
	return http.post('/shop/coupon/add', params)
}

export function delCoupon(id) {
	return http.delete('/shop/coupon/del/' + id)
}


